package com.zhiyou100.interceptor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 过滤器 测试1
 *
 * @author yang
 * @version 1.0.0
 * @date 2020-10-20 09:31
 */
@Component
@Slf4j
public class InterceptorTest01 implements HandlerInterceptor {
    @Override
    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
        log.error("拦截器执行了 ！！！！！，拦截的请求 " + request.getServletPath());
        return true;
    }
}
